/*
 * Selling Partner API for Orders
 * Use the Orders Selling Partner API to programmatically retrieve order information. With this API, you can develop fast, flexible, and custom applications to manage order synchronization, perform order research, and create demand-based decision support tools.   _Note:_ For the JP, AU, and SG marketplaces, the Orders API supports orders from 2016 onward. For all other marketplaces, the Orders API supports orders for the last two years (orders older than this don't show up in the response).
 *
 * OpenAPI spec version: v0
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package software.amazon.spapi.models.orders.v0;

import com.google.gson.annotations.SerializedName;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Objects;

/** A single order item&#x27;s buyer information. */
@Schema(description = "A single order item's buyer information.")
public class OrderItemBuyerInfo {
    @SerializedName("OrderItemId")
    private String orderItemId = null;

    @SerializedName("BuyerCustomizedInfo")
    private BuyerCustomizedInfoDetail buyerCustomizedInfo = null;

    @SerializedName("GiftWrapPrice")
    private Money giftWrapPrice = null;

    @SerializedName("GiftWrapTax")
    private Money giftWrapTax = null;

    @SerializedName("GiftMessageText")
    private String giftMessageText = null;

    @SerializedName("GiftWrapLevel")
    private String giftWrapLevel = null;

    public OrderItemBuyerInfo orderItemId(String orderItemId) {
        this.orderItemId = orderItemId;
        return this;
    }

    /**
     * An Amazon-defined order item identifier.
     *
     * @return orderItemId
     */
    @Schema(required = true, description = "An Amazon-defined order item identifier.")
    public String getOrderItemId() {
        return orderItemId;
    }

    public void setOrderItemId(String orderItemId) {
        this.orderItemId = orderItemId;
    }

    public OrderItemBuyerInfo buyerCustomizedInfo(BuyerCustomizedInfoDetail buyerCustomizedInfo) {
        this.buyerCustomizedInfo = buyerCustomizedInfo;
        return this;
    }

    /**
     * Get buyerCustomizedInfo
     *
     * @return buyerCustomizedInfo
     */
    @Schema(description = "")
    public BuyerCustomizedInfoDetail getBuyerCustomizedInfo() {
        return buyerCustomizedInfo;
    }

    public void setBuyerCustomizedInfo(BuyerCustomizedInfoDetail buyerCustomizedInfo) {
        this.buyerCustomizedInfo = buyerCustomizedInfo;
    }

    public OrderItemBuyerInfo giftWrapPrice(Money giftWrapPrice) {
        this.giftWrapPrice = giftWrapPrice;
        return this;
    }

    /**
     * Get giftWrapPrice
     *
     * @return giftWrapPrice
     */
    @Schema(description = "")
    public Money getGiftWrapPrice() {
        return giftWrapPrice;
    }

    public void setGiftWrapPrice(Money giftWrapPrice) {
        this.giftWrapPrice = giftWrapPrice;
    }

    public OrderItemBuyerInfo giftWrapTax(Money giftWrapTax) {
        this.giftWrapTax = giftWrapTax;
        return this;
    }

    /**
     * Get giftWrapTax
     *
     * @return giftWrapTax
     */
    @Schema(description = "")
    public Money getGiftWrapTax() {
        return giftWrapTax;
    }

    public void setGiftWrapTax(Money giftWrapTax) {
        this.giftWrapTax = giftWrapTax;
    }

    public OrderItemBuyerInfo giftMessageText(String giftMessageText) {
        this.giftMessageText = giftMessageText;
        return this;
    }

    /**
     * A gift message provided by the buyer. **Note**: This attribute is only available for MFN (fulfilled by seller)
     * orders.
     *
     * @return giftMessageText
     */
    @Schema(
            description =
                    "A gift message provided by the buyer.  **Note**: This attribute is only available for MFN (fulfilled by seller) orders.")
    public String getGiftMessageText() {
        return giftMessageText;
    }

    public void setGiftMessageText(String giftMessageText) {
        this.giftMessageText = giftMessageText;
    }

    public OrderItemBuyerInfo giftWrapLevel(String giftWrapLevel) {
        this.giftWrapLevel = giftWrapLevel;
        return this;
    }

    /**
     * The gift wrap level specified by the buyer.
     *
     * @return giftWrapLevel
     */
    @Schema(description = "The gift wrap level specified by the buyer.")
    public String getGiftWrapLevel() {
        return giftWrapLevel;
    }

    public void setGiftWrapLevel(String giftWrapLevel) {
        this.giftWrapLevel = giftWrapLevel;
    }

    @Override
    public boolean equals(java.lang.Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        OrderItemBuyerInfo orderItemBuyerInfo = (OrderItemBuyerInfo) o;
        return Objects.equals(this.orderItemId, orderItemBuyerInfo.orderItemId)
                && Objects.equals(this.buyerCustomizedInfo, orderItemBuyerInfo.buyerCustomizedInfo)
                && Objects.equals(this.giftWrapPrice, orderItemBuyerInfo.giftWrapPrice)
                && Objects.equals(this.giftWrapTax, orderItemBuyerInfo.giftWrapTax)
                && Objects.equals(this.giftMessageText, orderItemBuyerInfo.giftMessageText)
                && Objects.equals(this.giftWrapLevel, orderItemBuyerInfo.giftWrapLevel);
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                orderItemId, buyerCustomizedInfo, giftWrapPrice, giftWrapTax, giftMessageText, giftWrapLevel);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class OrderItemBuyerInfo {\n");

        sb.append("    orderItemId: ").append(toIndentedString(orderItemId)).append("\n");
        sb.append("    buyerCustomizedInfo: ")
                .append(toIndentedString(buyerCustomizedInfo))
                .append("\n");
        sb.append("    giftWrapPrice: ").append(toIndentedString(giftWrapPrice)).append("\n");
        sb.append("    giftWrapTax: ").append(toIndentedString(giftWrapTax)).append("\n");
        sb.append("    giftMessageText: ")
                .append(toIndentedString(giftMessageText))
                .append("\n");
        sb.append("    giftWrapLevel: ").append(toIndentedString(giftWrapLevel)).append("\n");
        sb.append("}");
        return sb.toString();
    }

    /** Convert the given object to string with each line indented by 4 spaces (except the first line). */
    private String toIndentedString(java.lang.Object o) {
        if (o == null) {
            return "null";
        }
        return o.toString().replace("\n", "\n    ");
    }
}
